/**
 * Copyright (c) 2015-2030 by Beijing Yanlight Co., Ltd.
 * All rights reserved.
 */
package com.yanlight.support.wx.model;

import java.util.SortedMap;
import java.util.TreeMap;

/**
 * 
 * @author haolw
 * @time 2017/07/20
 */
public class WxJsPaySign {
	private String appId;
	private String timeStamp;
	private String nonceStr;
	private String packageStr;
	private String signType = "MD5";
	private String paySign;

	public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	public String getTimeStamp() {
		return timeStamp;
	}

	public void setTimeStamp(String timeStamp) {
		this.timeStamp = timeStamp;
	}

	public String getNonceStr() {
		return nonceStr;
	}

	public void setNonceStr(String nonceStr) {
		this.nonceStr = nonceStr;
	}

	public String getPackageStr() {
		return packageStr;
	}

	public void setPackageStr(String prepayId) {
		this.packageStr = "prepay_id=" + prepayId;
	}

	public String getSignType() {
		return signType;
	}

	public void setSignType(String signType) {
		this.signType = signType;
	}

	public String getPaySign() {
		return paySign;
	}

	public void setPaySign(String paySign) {
		this.paySign = paySign;
	}

	public SortedMap<String, String> signParams() {
		SortedMap<String, String> signParams = new TreeMap<String, String>();
		signParams.put("appId", getAppId());
		signParams.put("timeStamp", getTimeStamp());
		signParams.put("nonceStr", getNonceStr());
		signParams.put("package", getPackageStr());
		signParams.put("signType", getSignType());
		return signParams;
	}
}
